<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c" %>

<head>
	 <jsp:include page="head.jsp"></jsp:include>
</head>
<body style="margin:0;padding:0;height:100%;overflow:hidden;background:#F2FBFF">
	<form id="sysform" method="post">
		<input type="hidden" id="sysId" name="id" value=""/>
	</form>
	<div class="easyui-layout" fit="true">
		<div region="north" border="false">
			<div class="toolbar">
				<a href="#" class="easyui-linkbutton" iconCls="icon-add" plain="true" onclick="newItem()">新增系统</a>
				<a href="#" class="easyui-linkbutton" iconCls="icon-edit" plain="true" onclick="editItem()">修改系统</a>
				<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" plain="true" onclick="delItem()">删除系统</a>
				<a href="javascript:advanceQuery()" class="easyui-linkbutton" iconCls="icon-search" plain="true">查询系统</a>
			</div>
		</div>
		
		<div region="center" border="false">
			<table id="t-systems" class="easyui-datagrid"
					url="<c:url value='/permissions/getItemsSystem.tg'/>"
					singleSelect="true" pagination="true"
					border="false" fit="true">
				<thead>
					<tr>
						<th field="id" width="100" sortable="true">系统ID</th>
						<th field="name" width="100" sortable="true">系统名称</th>
						<th field="ename" width="100" sortable="true">系统英文名称</th>
						<th field="contextPath" width="100">应用路径</th>
						<th field="logonUrl" width="100">登录URL</th>
						<th field="ssoType" width="50" formatter="ssoTypeFormatter">单点登录方式</th>
						<th field="order" width=50>排序</th>
						<th field="status" width="50" formatter="statusFormatter">状态</th>
						<th field="version" width="50">版本</th>
						<th field="builddate" width="100" sortable="true">创建日期</th>
						<th field="memo" width="300">备注</th>
					</tr>
				</thead>
			</table>
		</div>
	</div>
	
	<div id="dlg" style="width:430px;height:400px;"
			class="easyui-dialog" closed="true" modal="true" buttons="#dlg-buttons">
		<div style="padding-left:50px;padding-top:20px;">
			<div style="float:center">
				<form id="myform" method="post" style="margin:0;padding:0">
					<table>
						<tr>
							<td style="width:80px">系统ID</td>
							<td><input type="text" id="id" class="easyui-validatebox e-input" name="system.id" required="true"></input></td>
						</tr>					
						<tr>
							<td style="width:80px">系统名称</td>
							<td><input type="text" id="name" class="easyui-validatebox e-input" name="system.name" required="true"></input></td>
						</tr>
						<tr>
							<td>系统英文名称</td>
							<td>
								<input type="text" id="ename" class="e-input" name="system.ename" >
							</td>
						</tr>
						<tr>
							<td>上级系统：</td>
							<td><input id="parentId" name="system.parentId" class="easyui-combobox" style="width:200px"
											url="<c:url value='/permissions/getSystemsResources.tg'/>"
											valueField="id" textField="name"
											panelHeight="150px"></input></td>
						</tr>
						<tr>
							<td>是否目录</td>
							<td>
								<input id="isFolder" class="easyui-combobox"  name="system.isFolder" style="width:200px" 
									required="true" readonly="true" panelHeight="auto"
									url="<c:url value='/permissions/outDicJsonByNicknameActions.tg?nickName=yesorno'/>"
									valueField="value" textField="name">
							</td>
						</tr>												
						<tr>
							<td>应用路径</td>
							<td>
								<input type="text" id="contextPath" class="e-input" name="system.contextPath" >
							</td>
						</tr>
						<tr>
							<td>单点登录URL</td>
							<td><input type="text" id="logonUrl" class="e-input" name="system.logonUrl"></input></td>
						</tr>
						<tr>
							<td>单点登录方式</td>
							<td>
								<input id="ssoType" class="easyui-combobox"  name="system.ssoType" style="width:200px" 
									required="true" readonly="true" panelHeight="auto"
									url="<c:url value='/permissions/outDicJsonByNicknameActions.tg?nickName=sso_type'/>"
									valueField="value" textField="name">
							</td>
						</tr>
						<tr>
							<td>表单用户名称</td>
							<td><input type="text" id="formUserName" class="e-input" name="system.formUserName"></input></td>
						</tr>
						<tr>
							<td>表单密码名称</td>
							<td><input type="text" id="formPsName" class="e-input" name="system.formPsName"></input></td>
						</tr>
						<tr>
							<td>用主帐号登录</td>
							<td>
								<input id="ext2" class="easyui-combobox"  name="system.ext2" style="width:200px" 
									readonly="true" panelHeight="auto"
									url="<c:url value='/permissions/outDicJsonByNicknameActions.tg?nickName=yesorno'/>"
									valueField="value" textField="name">
							</td>
						</tr>						
						<tr>
							<td>注销URL</td>
							<td><input type="text" id="logoffUrl" class="e-input" name="system.logoffUrl"></input></td>
						</tr>
						<tr>
							<td>外网图标</td>
							<td><input type="text" id="icon" class="e-input" name="system.icon"></input></td>							
						</tr>
											
						<tr>
							<td>可用图标</td>
							<td><input type="text" id="logo" class="e-input" name="system.logo"></input></td>
						</tr>
						<tr>
							<td>不可用图标</td>
							<td><input type="text" id="ext1" class="e-input" name="system.ext1"></input></td>
						</tr> 
						<tr>
							<td>外部显示</td>
							<td>
								<input id="showOutFlag" class="easyui-combobox"  name="system.showOutFlag" style="width:200px" 
									required="true" readonly="true" panelHeight="auto"
									url="<c:url value='/permissions/outDicJsonByNicknameActions.tg?nickName=yesorno'/>"
									valueField="value" textField="name">
							</td>
						</tr>
						<tr>
							<td>内部显示</td>
							<td>
								<input id="showInerFlag" class="easyui-combobox"  name="system.showInerFlag" style="width:200px" 
									required="true" readonly="true" panelHeight="auto"
									url="<c:url value='/permissions/outDicJsonByNicknameActions.tg?nickName=yesorno'/>"
									valueField="value" textField="name">
							</td>
						</tr>
						<tr>
							<td>排序</td>
							<td><input type="text" id="order" class="e-input" name="system.order"></input></td>
						</tr>
						<tr>
							<td>状态</td>
							<td>
								<input id="status" class="easyui-combobox"  name="system.status" style="width:200px" 
									required="true" readonly="true" panelHeight="auto"
									url="<c:url value='/permissions/outDicJsonByNicknameActions.tg?nickName=status'/>"
									valueField="value" textField="name">
							</td>
						</tr>
						<tr>
							<td></td>
							<td>
								<input type="hidden" id="builddate" name="system.builddate"></input>
							</td>
						</tr>
						<tr>
							<td>版本</td>
							<td>
								<input type="text" id="version" class="e-input" name="system.version"></input>
							</td>
						</tr>
						<tr>
							<td>备注</td>
							<td><input type="text" id="memo" class="e-input" name="system.memo"></input></td>
						</tr>
						
						
						<!-- 
						<tr>
							<td>数据库类型</td>
							<td>
								<input id="dbType" class="easyui-combobox"  name="system.dbType" style="width:200px" 
									required="true" readonly="true" 
									url="<c:url value='/permissions/outDicJsonByNicknameActions.tg?nickName=dbType'/>"
									valueField="value" textField="name">
							</td>
						</tr>
						<tr>
							<td>数据库用户名</td>
							<td><input type="text" id="dbUser" class="e-input" name="system.dbUser"></input></td>
						</tr>
						<tr>
							<td>数据库密码</td>
							<td><input type="text" id="dbPwd" class="e-input" name="system.dbPwd"></input></td>
						</tr>
						 -->
						<tr>
							<td>用户验证URL</td>
							<td><input type="text" id="dbUrl" class="e-input" name="system.dbUrl"></input></td>
						</tr>						 
						<tr>
							<td>用户新增URL</td>
							<td><input type="text" id="userAddSql" class="e-input" name="system.userAddSql"></input></td>
						</tr>
						<tr>
							<td>用户删除URL</td>
							<td><input type="text" id="userDelSql" class="e-input" name="system.userDelSql"></input></td>
						</tr>
						<tr>
							<td>用户修改URL</td>
							<td><input type="text" id="userModSql" class="e-input" name="system.userModSql"></input></td>
						</tr>
						<tr>
							<td>用户权限URL</td>
							<td><input type="text" id="authModSql" class="e-input" name="system.authModSql"></input></td>
						</tr>
						
																							
					</table>
				</form>
			</div>
			<div style="clear:both"></div>
		</div>
		<div id="dlg-buttons" style="text-align:center;">
			<a href="#" class="easyui-linkbutton" iconCls="icon-save" onclick="saveItem()">保存</a>
			<a href="#" class="easyui-linkbutton" iconCls="icon-cancel" onclick="javascript:$('#dlg').dialog('close')">关闭</a>
		</div>
	</div>
	
</body>
